home *** CD-ROM | disk | FTP | other *** search
/ Creative Computers / Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso / shareware / fractals / mandelsquare / mandelsquare-1.06.lha / FPInit.asm < prev    next >
Assembly Source File  |  1992-11-08  |  1KB  |  68 lines

  1. **
  2. **    MandelSquare - AmigaDOS 2.0/3.0 Mandelbrot set explorer
  3. **
  4. **    FPInit.asm, fpu setup/cleanup routines
  5. **
  6. **    Copyright © 1991-1992 by Olaf `Olsen' Barthel
  7. **        All Rights Reserved
  8. **
  9.  
  10.     include    "exec/types.i"
  11.     include    "exec/execbase.i"
  12.  
  13. CALL    macro
  14.     xref    _LVO\1
  15.     jsr    _LVO\1(a6)
  16.     endm
  17.  
  18.     XDEF    ___fpinit
  19.     XDEF    ___fpterm
  20.  
  21.     XREF    __XCEXIT
  22.  
  23.     csect    text,0,0,1,2
  24.  
  25.     ;    VOID __fpinit(VOID);
  26.     ;
  27.     ;        This routine is called by the c.o startup code
  28.     ;    in order to set up and initialize math libraries or, just
  29.     ;    like done here, to check for the presence of an
  30.     ;    '881/'882/'040 chip.
  31.  
  32. ___fpinit:    
  33.     move.l    (4).w,a6        ; Grab SysBase
  34.  
  35.     cmp.w    #37,LIB_VERSION(a6)    ; Kickstart 2.x?
  36.     blt.s    2$
  37.  
  38.     move.w    AttnFlags(a6),d0    ; Get attention flags
  39.  
  40.     IFND    M68040
  41.  
  42.     btst    #AFB_68020,d0        ; '020 or higher installed?
  43.     beq.s    2$
  44.  
  45.     btst    #AFB_68881,d0        ; '881 or higher installed?
  46.     bne.s    1$
  47.  
  48.     ENDC
  49.  
  50.     btst    #AFB_68040,d0        ; If no '881 present, an '040
  51.     beq.s    2$            ; will do as well
  52.  
  53. 1$    rts
  54.  
  55. 2$    move.l    #1,-(sp)        ; Exit & fail
  56.     jmp    __XCEXIT
  57.  
  58.     ;    VOID __fpexit(VOID);
  59.     ;
  60.     ;        This routine is called by the c.o startup code
  61.     ;    in order to close and release math libraries or. In this
  62.     ;    case it does not do anything.
  63.  
  64. ___fpterm:
  65.     rts
  66.  
  67.     end
  68.